//
//  Base.m
//  LotteryClient
//
//  Created by Sunyon 14-3-31.
//  Copyright (c) 2014年 CTTC. All rights reserved.
//

#import "Base.h"
#import "BaseLog.h"
@implementation Base
static NSMutableArray *_allObjectMArray = nil;
- (id)init
{
    self = [super init];
    if (self)
	{
		if (_allObjectMArray == nil)
		{
            _allObjectMArray  = [NSMutableArray nonRetainingArray];
		}
        [_allObjectMArray addObject:self];
    }
    return self;
}

+ (NSMutableArray *)allBaseFrameworkObjectMArray
{
    return _allObjectMArray;
}


+ (void)addBaseFrameworkObject:(id)object
{
    if (_allObjectMArray == nil)
    {
        _allObjectMArray  = [NSMutableArray nonRetainingArray];
    }
	if (![_allObjectMArray containsObject:object])
    {
        [_allObjectMArray addObject:object];
    }
}


- (void)dealloc
{
    [_allObjectMArray removeObject:self];
}
@end
